/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package kr.or.eclipse.cedt.model.chromeExtension.impl;

import kr.or.eclipse.cedt.model.chromeExtension.ChromeExtensionPackage;
import kr.or.eclipse.cedt.model.chromeExtension.Icons;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Icons</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link kr.or.eclipse.cedt.model.chromeExtension.impl.IconsImpl#getIcon16 <em>Icon16</em>}</li>
 *   <li>{@link kr.or.eclipse.cedt.model.chromeExtension.impl.IconsImpl#getIcon48 <em>Icon48</em>}</li>
 *   <li>{@link kr.or.eclipse.cedt.model.chromeExtension.impl.IconsImpl#getIcon256 <em>Icon256</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class IconsImpl extends EObjectImpl implements Icons {
	/**
	 * The default value of the '{@link #getIcon16() <em>Icon16</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon16()
	 * @generated
	 * @ordered
	 */
	protected static final String ICON16_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getIcon16() <em>Icon16</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon16()
	 * @generated
	 * @ordered
	 */
	protected String icon16 = ICON16_EDEFAULT;

	/**
	 * The default value of the '{@link #getIcon48() <em>Icon48</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon48()
	 * @generated
	 * @ordered
	 */
	protected static final String ICON48_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getIcon48() <em>Icon48</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon48()
	 * @generated
	 * @ordered
	 */
	protected String icon48 = ICON48_EDEFAULT;

	/**
	 * The default value of the '{@link #getIcon256() <em>Icon256</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon256()
	 * @generated
	 * @ordered
	 */
	protected static final String ICON256_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getIcon256() <em>Icon256</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon256()
	 * @generated
	 * @ordered
	 */
	protected String icon256 = ICON256_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected IconsImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ChromeExtensionPackage.Literals.ICONS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getIcon16() {
		return icon16;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIcon16(String newIcon16) {
		String oldIcon16 = icon16;
		icon16 = newIcon16;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ChromeExtensionPackage.ICONS__ICON16, oldIcon16, icon16));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getIcon48() {
		return icon48;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIcon48(String newIcon48) {
		String oldIcon48 = icon48;
		icon48 = newIcon48;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ChromeExtensionPackage.ICONS__ICON48, oldIcon48, icon48));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getIcon256() {
		return icon256;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIcon256(String newIcon256) {
		String oldIcon256 = icon256;
		icon256 = newIcon256;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ChromeExtensionPackage.ICONS__ICON256, oldIcon256, icon256));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ChromeExtensionPackage.ICONS__ICON16:
				return getIcon16();
			case ChromeExtensionPackage.ICONS__ICON48:
				return getIcon48();
			case ChromeExtensionPackage.ICONS__ICON256:
				return getIcon256();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ChromeExtensionPackage.ICONS__ICON16:
				setIcon16((String)newValue);
				return;
			case ChromeExtensionPackage.ICONS__ICON48:
				setIcon48((String)newValue);
				return;
			case ChromeExtensionPackage.ICONS__ICON256:
				setIcon256((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ChromeExtensionPackage.ICONS__ICON16:
				setIcon16(ICON16_EDEFAULT);
				return;
			case ChromeExtensionPackage.ICONS__ICON48:
				setIcon48(ICON48_EDEFAULT);
				return;
			case ChromeExtensionPackage.ICONS__ICON256:
				setIcon256(ICON256_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ChromeExtensionPackage.ICONS__ICON16:
				return ICON16_EDEFAULT == null ? icon16 != null : !ICON16_EDEFAULT.equals(icon16);
			case ChromeExtensionPackage.ICONS__ICON48:
				return ICON48_EDEFAULT == null ? icon48 != null : !ICON48_EDEFAULT.equals(icon48);
			case ChromeExtensionPackage.ICONS__ICON256:
				return ICON256_EDEFAULT == null ? icon256 != null : !ICON256_EDEFAULT.equals(icon256);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (icon16: ");
		result.append(icon16);
		result.append(", icon48: ");
		result.append(icon48);
		result.append(", icon256: ");
		result.append(icon256);
		result.append(')');
		return result.toString();
	}

} //IconsImpl
